package com.demo.money.controller.app;

import com.demo.money.kit.JSONResult;
import com.demo.money.model.Type;
import com.demo.money.service.AppAllService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: zhangfengpu
 * @date: 2020/4/2
 */
@RestController
@RequestMapping("type")
public class AppAllTypeController {
    @Autowired
    private AppAllService appAllService;
    @GetMapping("/all")
    public JSONResult all(){
        List<Type> list = appAllService.selectAll();
        return JSONResult.ok(list);
    }
}
